<?
  header('Content-type:text/html;charset=utf-8');
  session_start();
 //'echo $_POST['verify'];
 // 'echo $_SESSION['login_check_number'];
  if (strtoupper($_POST['verify']) != $_SESSION['login_check_number']) {
	  ?>
   <script language='javascript'>alert('please retype the verify code');window.location = "./help.php";
</script>
  <? 
    }
?>  
<?  
include("inc/config.php");

$ok=$_POST["ok"];
$title=$_POST["title"];
$userName=$_POST["userName"];
$tel=$_POST["tel"];
$email=$_POST["email"];
$detail=$_POST["detail"];
$verycode=$_POST["verify"];
if($ok==""||$title==""||$email==""){
	?>
     <script language='javascript'>alert('Please insert required content!');window.location = "./help.php";</script>
     <? 
	 
}else{
	$sql="insert into smc_help(`title`,`userName`,`userTel`,`userEmail`,`content`)values('".$title."','".$userName."','".$tel."','".$email."','".$detail."')";
	mysql_query($sql);
	
	echo "<script language='javascript'>alert('Submit Success!');window.location = 'help.php';</script>";
	
    
	}

?>